﻿
//Validation when create or edit tag

$("form#TagForm").submit(function () {

    var TagName = $(":input#TagName").val();

    if (TagName == "") {
        $(":input#TagName").css({ "border-color": "red", "background-color": "pink" });
        return false;
    } else {
        $(":input#TagName").css({ "border-color": "", "background-color": "" });
        return true;
    }
});


//Validation When Create or Edit Article Subject
$("form#ArticleSubjectForm").submit(function () {

    var ArticleSubjectName = $(":input#ArtSubjectName").val();

    if (ArticleSubjectName == "") {
        $(":input#ArtSubjectName").css({ "border-color": "red", "background-color": "pink" });
        return false;
    } else {
        $(":input#ArtSubjectName").css({ "border-color": "", "background-color": "" });
        return true;
    }
});